<?php $this->load->view('common/head');?>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<form class="form-horizontal" name="add" id="add" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="post">
			<table class="table table-bordered table-condensed text-center" style="width: 340px; margin: 0 auto;">
				<tbody>
					<tr>
						<td class="bg-primary">*请填写主标题：</td>
						<td>
							<input type="text" required class="form-control" name="proTypeName" id="proTypeName" value="<?=$proTypeData['proTypeName']?>" placeholder="动作主标题">
						</td>
					</tr>
					<tr>
						<td class="bg-primary">状态：</td>
						<td>
							<input type="radio" required name="statusIs" id="isRequired1" value="1" <?=isset($proTypeData['statusIs']) && $proTypeData['statusIs'] == 1 ? 'checked':''?>> 使用
						  	<input type="radio" required name="statusIs" id="isRequired2" value="0" <?=isset($proTypeData['statusIs']) && $proTypeData['statusIs'] == 0 ? 'checked':''?>> 关闭
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<button type="submit" class="btn btn-default btn-primary">保存</button>
						  <button type="button" onclick="closeWindow()" class="btn btn-default btn-primary">取消</button>
						</td>
					</tr>
				</tbody>
			</table>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function(){
	initValidation();
});
//初始化验证
function initValidation(){
	$('form[name="add"]').find("input,select,textarea").jqBootstrapValidation("destroy");
	$('form[name="add"]').find("input,select,textarea").not("[type=submit]").jqBootstrapValidation({
	    preventSubmit:false,
	    submitSuccess: function (form, event) {
	         event.preventDefault();
	         ajaxFormSubmit('add');
	     },
	     submitError: function (form, event, errors) {
	       event.preventDefault();
	       }
  	});
}
</script>
<?php $this->load->view('common/foot');?>